mirror of
https://github.com/matrix-org/dendrite.git
synced 2025-12-15 10:53:09 -06:00
Content returned rather than the event (progress)
This commit is contained in:
parent
9fc30d85b3
commit
9a97a68ff3
|
|
@ -163,20 +163,20 @@ func obtainSavedTags(
|
||||||
userID string,
|
userID string,
|
||||||
roomID string,
|
roomID string,
|
||||||
accountDB *accounts.Database,
|
accountDB *accounts.Database,
|
||||||
) (string, []gomatrixserverlib.ClientEvent, error) {
|
) (string, gomatrixserverlib.RawJSON, error) {
|
||||||
localpart, _, err := gomatrixserverlib.SplitID('@', userID)
|
localpart, _, err := gomatrixserverlib.SplitID('@', userID)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return "", []gomatrixserverlib.ClientEvent{}, err
|
return "",gomatrixserverlib.RawJSON{}, err
|
||||||
}
|
}
|
||||||
|
|
||||||
data, err := accountDB.GetAccountDataByType(
|
data, err := accountDB.GetAccountDataByType(
|
||||||
req.Context(), localpart, roomID, "tag",
|
req.Context(), localpart, roomID, "tag",
|
||||||
)
|
)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return "", []gomatrixserverlib.ClientEvent{}, err
|
return "", gomatrixserverlib.RawJSON{}, err
|
||||||
}
|
}
|
||||||
|
|
||||||
return localpart, data, nil
|
return localpart, data.Content, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
// addDataToDB is a utility function to save the tag data into the DB
|
// addDataToDB is a utility function to save the tag data into the DB
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue